<?php

/**
 * JPGraph Plot Base Functionality
 * @package Nina
 * @author John Main <john@thedaddy.org>
 */
abstract class Nina_Graph_Jpgraph_Plot extends Nina_Graph_Jpgraph
{
	/**
	 * Hide the legend information
	 */
	public function hideLegend() {
		$this->plot->HideLegend();
	}

	/**
	 * Set the data
	 * @param array $datax The x axis data
	 * @param array [$datay=null] The y axis data
	 */
	public function setData($datax, $datay = null) {
		$this->plot->setData($datax, $datay);
	}

	/**
	 * Set the center
	 * @param integer $x the x coordinate
	 * @param integer $y the y coordinate
	 */
	public function setCenter($x, $y) {
		$this->plot->SetCenter($x, $y);
	}

	/**
	 * Set the weight
	 * @param integer $weight The weight
	 */
	public function setWeight($weight) {
		$this->plot->SetWeight($weight);
	}

	/**
	 * Set the line weight
	 * @param integer $weight The line weight
	 */
	public function setLineWeight($weight) {
		$this->plot->SetLineWeight($weight);
	}

	/**
	 * Set the plot font
	 * @param string $face The font face
	 * @param string $weight The font weight
	 * @param integer $size The font size
	 */
	public function setPlotFont($face, $weight, $size) {
		$this->plot->value->SetFont($face, $weight, $size);
	}

	/**
	 * Set the plot color
	 * @param string $color The color
	 */
	public function setPlotColor($color) {
		$this->plot->SetColor($color);
	}

	/**
	 * Set the plot shadow
	 * @param string [$color='darkgray'] The color
	 * @param integer $width The width
	 */
	public function setPlotShadow($color = 'darkgray', $width = 4) {
		$this->plot->SetShadow($color, $width);
	}
}
